Option Explicit
Sub P_Sample012()
    Dim myTmp   As Long
    Dim myDrive As String
    If Left(CurDir, 1) = Application.PathSeparator Then
        myTmp = InStr(3, CurDir, Application.PathSeparator)
        If myTmp = 0 Then
            myDrive = CurDir
        Else
            myDrive = Left(CurDir, myTmp - 1)
        End If
    Else
        myDrive = Left(CurDir, 1)
    End If
    MsgBox myDrive
End Sub
